<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<!--<link href="../js/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">-->
		<link rel="stylesheet" type="text/css" href="../../../js/bootstrap-3.3.7-dist/css/bootstrap.min.css" />
		<!--<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />-->
		<link rel="stylesheet" type="text/css" href="../../../css/footer.css" />
		<link rel="stylesheet" type="text/css" href="../../../css/gift_sell.css" />
		<script src="../../../js/flexible.min.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="../../../css/store_member/style.css" />
		<style type="text/css">
			.gift_sell_wap ul li {
				height: 4.3rem;
			}
			
			body {
				overflow: auto;
			}
			
			button.f28_s:focus {
				outline: none;
			}
			
			#top_scroll {
				position: fixed;
				bottom: 0.277777rem;
				right: 0.277777rem;
				z-index: 5;
				transition: all .5s;
			}
			
			#gift_main li p {
				position: relative;
				top: 0.277777rem;
			}
			
			.red_border {
				border-bottom: 1px solid red;
			}
			/*发货弹框*/
			
			.duihuan_box2 {
				display: none;
				width: 100%;
				height: 100%;
				position: fixed;
				top: 0;
				left: 0;
				background-color: rgba(0, 0, 0, 0.3);
			}
			
			.duihuan2 {
				width: 6.944444rem;
				height: 4.152777rem;
				background-color: white;
				margin: 0 auto;
				margin-top: 5rem;
				position: absolute;
				left: 50%;
				margin-left: -3.49rem;
			}
			
			.duihuan_top2 {
				font-size: 0.416666rem;
				color: #E8323E;
				text-align: center;
				padding-top: 0.888888rem;
				padding-bottom: 1.444444rem;
			}
			
			.duihuan_down2 {
				width: 5.902777rem;
				height: 1.388888rem;
				margin: 0 auto;
				border-top: 1px solid #DBDBDB;
			}
			
			.duihuan_down2 a {
				width: 2.013888rem;
				height: 0.694444rem;
				border: 1px solid #E8323E;
				margin-top: 0.208333rem;
				text-align: center;
				line-height: 0.694444rem;
				border-radius: 0.694444rem;
			}
			
			.duihuan_down2 a:nth-child(1) {
				float: left;
				color: white;
				background-color: #E8323E;
			}
			
			.duihuan_down2 a:nth-child(2) {
				float: right;
				color: #E8323E;
			}
			/*发货弹框*/
			
			.duihuan_box1 {
				/*<<<<<<< HEAD*/
				display: none;
				width: 100%;
				height: 100%;
				position: fixed;
				top: 0;
				left: 0;
				background-color: rgba(0, 0, 0, 0.3);
			}
			
			.duihuan1 {
				width: 6.944444rem;
				height: 4.152777rem;
				background-color: white;
				margin: 0 auto;
				margin-top: 5rem;
				position: absolute;
				left: 50%;
				margin-left: -3.49rem;
			}
			
			.duihuan_top1 {
				font-size: 0.416666rem;
				color: #E8323E;
				text-align: center;
				padding-top: 0.888888rem;
				padding-bottom: 1.444444rem;
			}
			
			.duihuan_down1 {
				width: 5.902777rem;
				height: 1.388888rem;
				margin: 0 auto;
				border-top: 1px solid #DBDBDB;
			}
			
			.duihuan_down1 a {
				width: 2.013888rem;
				height: 0.694444rem;
				border: 1px solid #E8323E;
				margin-top: 0.208333rem;
				text-align: center;
				line-height: 0.694444rem;
				border-radius: 0.694444rem;
			}
			
			.duihuan_down1 a:nth-child(1) {
				float: left;
				color: white;
				background-color: #E8323E;
			}
			
			.duihuan_down1 a:nth-child(2) {
				float: right;
				color: #E8323E;
			}
			
			div.yijimai {
				position: relative;
				top: 100px;
				height: 2rem;
			}
			/*=======
	display: none;
	width: 100%;
	height: 100%;
	position: fixed;
	top: 0;
	left: 0;
	background-color: rgba(0, 0, 0, 0.3);
}

.duihuan1 {
	width: 6.944444rem;
	height: 4.152777rem;
	background-color: white;
	margin: 0 auto;
	margin-top: 5rem;
	position: absolute;
	left: 50%;
	margin-left: -3.49rem;
}

.duihuan_top1 {
	font-size: 0.416666rem;
	color: #E8323E;
	text-align: center;
	padding-top: 0.888888rem;
	padding-bottom: 1.444444rem;
}

.duihuan_down1 {
	width: 5.902777rem;
	height: 1.388888rem;
	margin: 0 auto;
	border-top: 1px solid #DBDBDB;
}

.duihuan_down1 a {
	width: 2.013888rem;
	height: 0.694444rem;
	border: 1px solid #E8323E;
	margin-top: 0.208333rem;
	text-align: center;
	line-height: 0.694444rem;
	border-radius: 0.694444rem;
}

.duihuan_down1 a:nth-child(1) {
	float: left;
	color: white;
	background-color: #E8323E;
}

.duihuan_down1 a:nth-child(2) {
	float: right;
	color: #E8323E;
}			
/*div.yijimai{
	position: relative;
	top: 100px;
	height: 2rem;
}*/
			/*>>>>>>> 71c89cae8fc3bf80cb21d34ffe3b45a722114c75*/
		</style>
	</head>

	<body>
		<div id="wrap">
			<div id="main">
				<div id="header">
					<a id="headImg" href="javascript:history.go(-1)"><img class="headImg" src="../../../images/12.png" /></a>
					<p id="headTitle" style="box-shadow: none;">平台返购</p>
				</div>
				<div id="content">
					<div id="top_scroll" onclick="topScroll()">
						回到顶部
					</div>
					
					<div class="gift_sell_wap">
						<ul id="gift_main" style="margin-top:1.4rem;">
						</ul>
					</div>
					
				</div>
			</div>
		</div>
		
		
		
		<!-- /.modal -->

	</body>
	<script src="../../../js/jquery-2.2.3.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../js/bootstrap-3.3.7-dist/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		
		//登陆判断
		var tokenReztApp = $.cookie("tokenReztApp");
		if(!tokenReztApp) {
			window.location.href = "../../login/login/login.html";
		}
		$(function() {
			currentyf();
			returnXZ();
		});
		//用户信息
		var user, role, goodsId;
		//获取当前会员信息
		function currentyf() {
			$.ajax({
				cache: false,
				type: "GET",
				url: "http://47.104.13.109/member-service/auth/current?token=" + tokenReztApp,
				dataType: "JSON",
				async: false,
				error: function(XMLHttpRequest, textStatus, errorThrown) {
					$.removeCookie('tokenReztApp', {
						expires: 7,
						path: '/'
					});
					$.removeCookie("tokenRh", {
						expires: 7,
						path: '/'
					});
					$.removeCookie('memberId', {
						expires: 7,
						path: '/'
					});
					$.removeCookie('roleId', {
						expires: 7,
						path: '/'
					});
					window.location.href = "../../login/login/login.html";
				},
				success: function(data) {
					user = data.loginName;
					role = data.roleList[0].id; //角色
					goodsId = data.id;

				}
			});
		}
		
		var memberId = "";
		var pageNum = 1;
		var pageSize = 1000;
		var roles = '';
		var cartId = ''; //这里已相当于orderSn
		var status = '';
		$.ajax({
			type: "get",
			url: "http://47.104.13.109/member-service/member/mine/member?token=" + $.cookie('tokenRh'),
			async: false,
			success: function(data) {
				console.log(data);
				memberId = data.id;
				roles = data.roleList;
			}
		});
		
		//平台返购数据
		function returnXZ(){
			$.ajax({
				type: "get",
				url: "http://47.104.13.109:80/order-service/selectreturn",
				async: true,
				data: {
					pageNum: 1,
					pageSize: 10000,
					userId: goodsId
				},
				success: function(data) {
					var list = data.list;
					var a = '';
					for(var i = 0; i < list.length; i++) {
						{
							a += '<li style="overflow: hidden; height:auto;padding-bottom: 0.2rem; "><div class="gift_left" style="width:25%;"><img src="' + list[i].goodsPic + '"/></div><div class="gift_right" style="margin-top:0.8rem;width:65%; height:auto;"><p style="width:100%;">商品名：' + list[i].goodsName + '</p><p>商品数量:' + list[i].goodsCount + '</p><p>返购金币:' + list[i].returenGold + '</p><p class="active_red"  style="position: absolute;bottom: 1.625rem; top:0.4rem;">返购时间：' + list[i].orderCreatetime + '</p></div><div class="duihuan"></div><p style="clear: both;margin-top: 1rem;text-align: center;"></p></li>'
						$('#gift_main').html(a);
					}
					}
				}
			});
		}
		

	</script>

</html>